﻿using UnityEngine;
using System.Collections;

public class GfxNeuronToColor : MonoBehaviour {

	public GameObject outputObject;
	public Color color0;
	public Color color1;

	public Neuron inputNeuron;

	void Update () {	
		float f = (inputNeuron.axon / 65534.0f);
		Color c = (1-f)*color0 + (f)*color1;
		outputObject.GetComponent<Renderer>().material.color = c;
	}

}
